#include <iostream>
#include <queue>
#include <map>
#include <unordered_map>
#include <vector>
#include <algorithm>
#include <cmath>
#include <string>
#include <cstring>
#include <set>
#include <unordered_set>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef pair<int,int> pii;
const int N=1e6+10;
int prime[N];
int v[N];
int m=0;
void get_prime(int n)
{
	
	for (int i = 2; i<=n; i++) {
	if (v[i] == 0) { 
		v[i] = i;
		prime[++m] = i;
	}
	for (int j = 1; j <= m; j++) {
		if (prime[j] > v[i] || prime[j] > n/i) break;
		v[i*prime[j]] = prime[j];
	}
}

}
int main()
{
	int n;
	cin>>n;
	get_prime(n);
	cout<<m<<endl;

	return 0;
}

